package ecom.beans;

import ecom.beans.exception.AccountBeanException;
import ecom.beans.exception.CartException;
import ecom.beans.exception.StockQuantityUnavailable;
import javax.ejb.Local;

@Local
interface CartLocal {

    CartBean.CartState getState();

    void setState(CartBean.CartState state);

    void addProduct(AccountBean account,Long idProduct, Long idProductstore, Integer quantity) throws CartException,StockQuantityUnavailable;

    void updateProductQuantity(Long idProduct, Long idProductstore, Integer quantity) throws StockQuantityUnavailable,CartException;

    void removeProduct(Long idProduct, Long idProductstore) throws CartException;

    java.util.Set<PurchaseBean> getCart();

    Double getTotalPrice();

    void buy(AccountBean account) throws CartException, AccountBeanException;

    void emptyCart();

    void initializeCart();
}
